package com.ruoyi.user.controller;

import com.ruoyi.model.dto.UserDTO;
import com.ruoyi.user.pojo.UserEntity;
import com.ruoyi.user.result.Result;
import com.ruoyi.user.result.ResultObject;
import com.ruoyi.user.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Description: new java files header..
 *
 * @author 兰剑
 * @version 1.0
 * @date 2023/2/25 10:10
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    private UserService userService;






    /**@Description: 登录方法
     * @param
     * @return
     * @version v1.0
     * @author 兰剑
     * @date 2023/2/25 10:20
     */
    @PostMapping("/login")
    public ResultObject<UserEntity> login(@RequestBody UserDTO userDTO){

        return userService.login(userDTO);
    }




}
